package me.ingxin.android.sample.lego.handler;

import android.content.Context;
import android.util.Log;
import android.widget.Toast;

import androidx.annotation.NonNull;

import me.ingxin.android.router.annotaions.Route;
import me.ingxin.android.router.route.Request;
import me.ingxin.android.router.route.RouteHandler;

/**
 * Created by ingxin on 2022/4/27
 */
@Route(path = "/handler/test5", hold = true)
public class Test5Handler extends RouteHandler {

    @Override
    public void handle(@NonNull Context context, @NonNull Request request) {
        String a = request.getString("a", null);
        String b = request.getString("b", null);
        Toast.makeText(context, "Test5Handler：接收到a=" + a + ",b=" + b, Toast.LENGTH_SHORT).show();
    }

    @Override
    public void onRelease() {
        Log.d("Lego:Router", "释放Test5Handler");
    }
}
